﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CmpClass
{
    /// <summary>
    /// 创建Round类，用来测试方法的重载技术
    /// </summary>
    public class Round
    {
        /// <summary>
        /// 计算周长Circumference
        /// </summary>
        /// <param name="radius"></param>
        /// <returns></returns>
        public float Account(float radius)
        {
            float cir = (float)(2 * Math.PI * radius);
            return cir;
        }

        /// <summary>
        /// 计算面积Area
        /// </summary>
        /// <param name="radius"></param>
        /// <returns></returns>
        public double Account(double radius)
        {
            double area = Math.PI * Math.Pow(radius, 2);
            return area;
        }

        /// <summary>
        /// 计算圆柱体的体积Volume
        /// </summary>
        /// <param name="radius"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        public double Account(double radius,double height)
        {
            double vol = Math.PI * Math.Pow(radius, 2) * height;
            return vol;
        }
    }

    //*
    /// <summary>
    /// 定义Student结构体
    /// </summary>
    struct Student
    {
        public string StuNo;
        public string StuName;
        public string StuClass;
        public double StuMath;
        public double StuChn;
        public double StuEng;
    }
    //*/

    /*
    /// <summary>
    /// 定义Student类
    /// </summary>
    public class Student
    {
        /// <summary>
        /// 声明字段，小写
        /// </summary>
        private string stuno;
        private string stuname;
        private string stuclass;
        private double stumath;
        private double stuchn;
        private double stueng;

        /// <summary>
        /// get/set方法
        /// </summary>
        public string StuNo
        {
            get { return stuno; }
            set { stuno = value; }
        }
        public string StuName
        {
            get { return stuname; }
            set { stuname = value; }
        }
        public string StuClass
        {
            get { return stuclass; }
            set { stuclass = value; }
        }
        public double StuMath
        {
            get { return stumath; }
            set { stumath = value; }
        }
        public double StuChn
        {
            get { return stuchn; }
            set { stuchn = value; }
        }
        public double StuEng
        {
            get { return stueng; }
            set { stueng = value; }
        }
    }*/
}
